bitkeeper revision 1.1389.9.6 (428135ccBlRW99tjfmtjk5XjVtLT3A)
authordjm@kirby.fc.hp.com <djm@kirby.fc.hp.com>
Tue, 10 May 2005 22:29:32 +0000 (22:29 +0000)
committerdjm@kirby.fc.hp.com <djm@kirby.fc.hp.com>
Tue, 10 May 2005 22:29:32 +0000 (22:29 +0000)
Minor adaptations for common ACPI update and other common changes

xen/arch/ia64/domain.c
xen/arch/ia64/irq.c
xen/arch/ia64/mm_init.c
xen/arch/ia64/patch/linux-2.6.11/unaligned.c
xen/arch/ia64/process.c
xen/arch/ia64/xenmisc.c
xen/include/asm-ia64/config.h
xen/include/asm-ia64/domain.h

index 056e9a711b084b12008f14cb3f860148e3f16f42..c20f025d7af2ca367c1da646f4a0f9846491a442 100644 (file)
@@ -191,7 +191,7 @@ void arch_do_createdomain(struct exec_domain *ed)
        // stay on kernel stack because may get interrupts!
        // ia64_ret_from_clone (which b0 gets in new_thread) switches
        // to user stack
-       ed->thread.on_ustack = 0;
+       ed->arch._thread.on_ustack = 0;
 }
 
 void arch_do_boot_vcpu(struct exec_domain *p)
@@ -261,7 +261,7 @@ void new_thread(struct exec_domain *ed,
 printf("new_thread: ed=%p, start_pc=%p, regs=%p, sw=%p, new_rbs=%p, IA64_STK_OFFSET=%p, &r8=%p\n",
 ed,start_pc,regs,sw,new_rbs,IA64_STK_OFFSET,&regs->r8);
        sw->b0 = (unsigned long) &ia64_ret_from_clone;
-       ed->thread.ksp = (unsigned long) sw - 16;
+       ed->arch._thread.ksp = (unsigned long) sw - 16;
        //ed->thread_info->flags = 0;
 printk("new_thread, about to call init_all_rr\n");
        init_all_rr(ed);
index 1b4e277343d678cdd38b2b53bf4c6f085280a224..b04d49cc70815289a8a7de6050afb845a84a7eb8 100644 (file)
@@ -1406,9 +1406,11 @@ int pirq_guest_bind(struct exec_domain *d, int irq, int will_share)
         desc->handler->startup(irq);
 
         /* Attempt to bind the interrupt target to the correct CPU. */
+#if 0 /* FIXME CONFIG_SMP ??? */
         if ( desc->handler->set_affinity != NULL )
             desc->handler->set_affinity(
                 irq, apicid_to_phys_cpu_present(d->processor));
+#endif
     }
     else if ( !will_share || !action->shareable )
     {
index d316e0535792ec1b1c8868e42560d567b1700c68..0e3ce45decafcead0d7b00637a3e3a2963d5e0bb 100644 (file)
@@ -227,7 +227,7 @@ ia64_set_rbs_bot (void)
 
        if (stack_size > MAX_USER_STACK_SIZE)
                stack_size = MAX_USER_STACK_SIZE;
-       current->thread.rbs_bot = STACK_TOP - stack_size;
+       current->arch._thread.rbs_bot = STACK_TOP - stack_size;
 }
 
 /*
@@ -255,7 +255,7 @@ printf("ia64_init_addr_space: called, not implemented\n");
        if (vma) {
                memset(vma, 0, sizeof(*vma));
                vma->vm_mm = current->mm;
-               vma->vm_start = current->thread.rbs_bot & PAGE_MASK;
+               vma->vm_start = current->arch._thread.rbs_bot & PAGE_MASK;
                vma->vm_end = vma->vm_start + PAGE_SIZE;
                vma->vm_page_prot = protection_map[VM_DATA_DEFAULT_FLAGS & 0x7];
                vma->vm_flags = VM_READ|VM_WRITE|VM_MAYREAD|VM_MAYWRITE|VM_GROWSUP;
index bcc165e95e2ffca91f6aabce46828896d06642db..0ed114e064caa4242d0ade26c1cd6b4f75d119a9 100644 (file)
@@ -1,5 +1,5 @@
 --- ../../linux-2.6.11/arch/ia64/kernel/unaligned.c    2005-03-02 00:38:25.000000000 -0700
-+++ arch/ia64/unaligned.c      2005-04-28 15:40:13.000000000 -0600
++++ arch/ia64/unaligned.c      2005-05-10 15:46:09.000000000 -0600
 @@ -437,7 +437,11 @@
  }
  
  setreg (unsigned long regnum, unsigned long val, int nat, struct pt_regs *regs)
  {
        struct switch_stack *sw = (struct switch_stack *) regs - 1;
-@@ -611,7 +615,11 @@
+@@ -522,7 +526,11 @@
+        */
+       if (regnum >= IA64_FIRST_ROTATING_FR) {
+               ia64_sync_fph(current);
++#ifdef XEN
++              current->arch._thread.fph[fph_index(regs, regnum)] = *fpval;
++#else
+               current->thread.fph[fph_index(regs, regnum)] = *fpval;
++#endif
+       } else {
+               /*
+                * pt_regs or switch_stack ?
+@@ -581,7 +589,11 @@
+        */
+       if (regnum >= IA64_FIRST_ROTATING_FR) {
+               ia64_flush_fph(current);
++#ifdef XEN
++              *fpval = current->arch._thread.fph[fph_index(regs, regnum)];
++#else
+               *fpval = current->thread.fph[fph_index(regs, regnum)];
++#endif
+       } else {
+               /*
+                * f0 = 0.0, f1= 1.0. Those registers are constant and are thus
+@@ -611,7 +623,11 @@
  }
  
  
@@ -24,7 +48,7 @@
  getreg (unsigned long regnum, unsigned long *val, int *nat, struct pt_regs *regs)
  {
        struct switch_stack *sw = (struct switch_stack *) regs - 1;
-@@ -1294,6 +1302,9 @@
+@@ -1294,6 +1310,9 @@
  void
  ia64_handle_unaligned (unsigned long ifa, struct pt_regs *regs)
  {
@@ -34,7 +58,7 @@
        struct ia64_psr *ipsr = ia64_psr(regs);
        mm_segment_t old_fs = get_fs();
        unsigned long bundle[2];
-@@ -1502,4 +1513,5 @@
+@@ -1502,4 +1521,5 @@
        si.si_imm = 0;
        force_sig_info(SIGBUS, &si, current);
        goto done;
index 1e0c10f53fa53ca1b4930086b140505c9d50414d..dd9e58071f3d51a69130dfee73b147db8f8a8618 100644 (file)
@@ -517,7 +517,7 @@ printf("ia64_fault, vector=0x%p, ifa=%p, iip=%p, ipsr=%p, isr=%p\n",
              case 32: /* fp fault */
              case 33: /* fp trap */
                //result = handle_fpu_swa((vector == 32) ? 1 : 0, regs, isr);
-               if ((result < 0) || (current->thread.flags & IA64_THREAD_FPEMU_SIGFPE)) {
+               //if ((result < 0) || (current->thread.flags & IA64_THREAD_FPEMU_SIGFPE)) {
                        //siginfo.si_signo = SIGFPE;
                        //siginfo.si_errno = 0;
                        //siginfo.si_code = FPE_FLTINV;
@@ -526,7 +526,7 @@ printf("ia64_fault, vector=0x%p, ifa=%p, iip=%p, ipsr=%p, isr=%p\n",
                        //siginfo.si_isr = isr;
                        //siginfo.si_imm = 0;
                        //force_sig_info(SIGFPE, &siginfo, current);
-               }
+               //}
                //return;
                sprintf(buf, "FP fault/trap");
                break;
index 09dfc2a7b9bc41f5deb559fb13d69df55da7076b..189c30b908e8610a049a86ea1e7b3cdb6692f05c 100644 (file)
@@ -79,6 +79,14 @@ void raise_actimer_softirq(void)
        raise_softirq(AC_TIMER_SOFTIRQ);
 }
 
+unsigned long __hypercall_create_continuation(
+       unsigned int op, unsigned int nr_args, ...)
+{
+       printf("__hypercall_create_continuation: not implemented!!!\n");
+}
+
+///////////////////////////////
+
 ///////////////////////////////
 // from arch/x86/apic.c
 ///////////////////////////////
index 0a3672b18e2766dda651c127e0b28d2bbf10cae7..52e42933bb56a2912d05d558a6c834a290264f7b 100644 (file)
@@ -258,6 +258,14 @@ struct screen_info { };
 #define seq_printf(a,b...) printf(b)
 #define CONFIG_BLK_DEV_INITRD // needed to reserve memory for domain0
 
+//
+#define __smp_processor_id() (current->processor)
+
+// needed for newer ACPI code
+#define asmlinkage
+
+#define FORCE_CRASH()  asm("break 0;;");
+
 // these declarations got moved at some point, find a better place for them
 extern int opt_noht;
 extern int ht_per_core;
index 619d450a00a6c7cf635903803cc8d2d41869c2f0..7b6758078e7ba0c0223e3fded80941f8943e74b9 100644 (file)
@@ -60,7 +60,7 @@ struct arch_exec_domain {
 };
 
 #define active_mm arch.active_mm
-#define thread arch._thread
+//#define thread arch._thread
 
 // FOLLOWING FROM linux-2.6.7/include/sched.h